import Vue from 'vue'
import Vuex from 'vuex'

// import state from './state'
// import getters from './getters'
// import mutations from './mutations'
// import actions from './actions'
import VuexPersist from 'vuex-persist'

const vuexLocal = new VuexPersist({
    storage: window.localStorage //可选，sessionStorage/indexDB  // 你的储存方式
  });
Vue.use(Vuex); export default new Vuex.Store({
    state: {
        zhanghao:'',
        mima:''
    },
    mutations: {
        setN(item, zhi) {
        this.state.zhanghao = zhi
        console.log(this.state.zhanghao)
        },
        setM(item,mima){
            this.state.mima = mima
            console.log(this.state.mima)
        }
    },  


})
// const store = new Vuex.Store({
//     state,
//     getters,
//     mutations,
//     actions,
//     plugins: [vuexLocal.plugin]
//   });